package com.lepai.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

/**
 * @author weihaolong
 * @date 2018-11-20 16:47
 */
@Configuration
public class RestFulConfiguration {

    @Bean("defaultRestTemplate")
    public RestTemplate defaultRestTemplate(){
        return new RestTemplate(new HttpComponentsClientHttpRequestFactory());
    }
}
